import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询岗位列表
export function listStage(query) {
  return request({
    url: '/stage/stagelist/list',
    method: 'get',
    params: query
  })
}

//查询阶段详情
export function getStage(stageId) {
  return request({
    url: '/stage/stagelist/' +  parseStrEmpty(stageId),
    method: 'get'
  })
}

// 新增阶段
export function addStage(data) {
  return request({
    url: '/stage/stagelist',
    method: 'post',
    data: data
  })
}

// 修改阶段
export function updateStage(data) {
  return request({
    url: '/stage/stagelist',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delStage(stageIds) {
  return request({
    url: '/stage/stagelist/' + stageIds,
    method: 'delete'
  })
}
